<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>明腾CMS管理后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="__PUBLIC__/mingteng/favicon.ico" type="image/x-icon">
    <!-- Bootstrap 3.3.4 -->
    <link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- FontAwesome 4.3.0 -->
 	<link href="__PUBLIC__/bootstrap/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Ionicons 2.0.0 --
    <link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
    Theme style -->
    <link href="__PUBLIC__/mingteng/css/admin.css" rel="stylesheet" type="text/css" />

    <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__PUBLIC__/js/laydate/laydate.js"></script>
    <script src="__PUBLIC__/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/js/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
    <script src="__PUBLIC__/js/common.js"></script>
    <script src="__PUBLIC__/mingteng/js/admin.js"></script>
    <script src="__PUBLIC__/js/layui-v2.7.6/layui/layui.js"></script>
    <if condition="$editor">
      <load href="__PUBLIC__/plugins/Ueditor/ueditor.config.js"/>
      <load href="__PUBLIC__/plugins/Ueditor/ueditor.all.min.js"/>
      <script type="text/javascript" charset="utf-8" src="__PUBLIC__/plugins/Ueditor/lang/zh-cn/zh-cn.js"></script>
    </if>
    <script type="text/javascript">



    function order_del(obj){
        layer.confirm('确认删除？', function(){
                $.ajax({
                    type : 'post',
                    url : $(obj).attr('data-url'),
                    data : {id:$(obj).attr('data-id')},
                    dataType : 'json',
                    success : function(data){
                        if(data==1){
                            layer.msg('操作成功',{icon:1,time:1000},function(){if(data.url){ window.location.href = data.url;}});
                        }else{
                            layer.alert(data, {icon: 2,time: 2000});
                        }
                    }
                })
            }
        );
    }

    //全选
    function selectAll(name,obj){
    	$('input[name*='+name+']').prop('checked', $(obj).checked);
    }
    
    function delAll(obj,name){
    	var a = [];
    	$('input[name*='+name+']').each(function(i,o){
    		if($(o).is(':checked')){
    			a.push($(o).val());
    		}
    	})
    	if(a.length == 0){
    		layer.alert('请选择删除项', {icon: 2});
    		return;
    	}
    	layer.confirm('确认删除？', function(){
    			$.ajax({
    				type : 'get',
    				url : $(obj).attr('data-url'),
    				data : {act:'del',del_id:a},
    				dataType : 'json',
    				success : function(data){
						layer.closeAll();
    					if(data == 1){
    						layer.msg('操作成功', {icon: 1});
    						$('input[name*='+name+']').each(function(i,o){
    							if($(o).is(':checked')){
    								$(o).parent().parent().remove();
    							}
    						})
    					}else{
    						layer.msg(data, {icon: 2,time: 2000});
    					}
    				}
    			})
    		}, function(index){
    			layer.close(index);
    			return false;// 取消
    		}
    	);	
    }
    </script>        
  </head>
  <body style="background-color:#ecf0f5;">
 
